package com.ruoyi.delivery.service.impl;
import com.ruoyi.delivery.domain.DelAllocationDetail;
import com.ruoyi.delivery.mapper.DelAllocationDetailMapper;
import com.ruoyi.delivery.service.IDelAllocationDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 调拨单明细 服务层实现
 *
 * @author oasis
 */
@Service
public class DelAllocationDetailServiceImpl implements IDelAllocationDetailService {

    @Autowired
    private DelAllocationDetailMapper allocationDetailMapper;
    /**
     * 根据 allocationNo 获取所有运单明细
     *
     * @param allocationNo 调拨单号
     * @return 调拨明细列表
     */
    @Override
    public List<DelAllocationDetail> getDetailsByAllocationNo(String allocationNo) {
        return allocationDetailMapper.getDetailsByAllocationNo(allocationNo);
    }
    /**
     * 插入调拨单明细
     *
     * @param detail 运单明细对象
     * @return 影响的行数
     */
    @Override
    public int insertAllocationDetail(DelAllocationDetail detail) {
        return allocationDetailMapper.insertAllocationDetail(detail);
    }
    /**
     * 删除运单明细
     *
     * @param allocationDetailNo 调拨单明细编号
     * @return 影响的行数
     */
    @Override
    public int deleteAllocationDetail(String allocationDetailNo) {
        return allocationDetailMapper.deleteAllocationDetail(allocationDetailNo) ;
    }
    /**
     * 修改运单明细
     *
     * @param detail 运单明细对象
     * @return 影响的行数
     */
    @Override
    public int updateAllocationDetail(DelAllocationDetail detail) {
        return allocationDetailMapper.updateAllocationDetail(detail);
    }
}
